﻿<%@ Page Title="" Language="C#" MasterPageFile="~/AdminCP/admincp.Master" AutoEventWireup="true"
    CodeBehind="ListVideo.aspx.cs" Inherits="SES.CMS.AdminCP.ListVideo" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <h2>
        Danh sách Video</h2>
    <div style="width: 60%; float: left; margin-bottom: 10px;">
        Lựa chọn theo sản phẩm:
        <asp:DropDownList runat="server" ID="ddlProduct" AppendDataBoundItems="true" AutoPostBack="True"
            OnSelectedIndexChanged="ddlProduct_SelectedIndexChanged">
            <asp:ListItem Text=".: Chọn toàn bộ :. " Value="0"></asp:ListItem>
        </asp:DropDownList>
    </div>
    <asp:DataList ID="dlImages" runat="server" Width="100%" BackColor="White" BorderColor="#CC9966"
        BorderStyle="None" BorderWidth="1px" CellPadding="4" GridLines="Both" RepeatColumns="5"
        RepeatDirection="Horizontal" DataKeyField="MediaID" OnDeleteCommand="dlImages_DeleteCommand"
        OnSelectedIndexChanged="dlImages_SelectedIndexChanged">
        <FooterStyle BackColor="#FFFFCC" ForeColor="#330099" />
        <ItemStyle BackColor="White" ForeColor="#330099" Width="120px" />
        <SelectedItemStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="#663399" />
        <HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="#FFFFCC" />
        <ItemTemplate>
            <center>
                <a class="fancyboxx" rel="group1" title="<%#Eval("Title")%>"
                    href="<%#"/Media/" + (Eval("MediaFile")).ToString() %>">
                    <itemtemplate>
                       <iframe src='http://www.youtube.com/embed/<%#Eval("MediaUrl")%>' width="200px" height="150px"
                        style="margin: 0px 0px 0px 0px;" frameborder="0" allowfullscreen="true"></iframe>
                    </itemtemplate>
                    <%--<img width="100px" height="70px" src="<%#"/Media/" + (Eval("MediaUrl")).ToString() %>" />--%>
                </a>
                <br />
                <asp:ImageButton ID="btEdit" runat="server" CommandName="Select" ImageUrl="~/AdminCP/images/edit_16x16.gif" />
                <asp:ImageButton ID="btDelete" runat="server" CommandArgument='<%#Eval("MediaID") %>'
                    CommandName="Delete" ImageUrl="~/AdminCP/images/delete_16x16.gif" OnClientClick="return confirm('Có muốn xóa bản ghi này? Nhấn OK để xóa!')" />
                <br />
                <%#Eval("Title")%>
            </center>
        </ItemTemplate>
        
    </asp:DataList>
    <table border="0" width="100%">
        <tr>
            <td align="left">
                <asp:LinkButton ID="lbPrev" runat="server" Font-Bold="True" OnClick="lbPrev_Click1">
Trang trước
                </asp:LinkButton>
            </td>
            <td align="right">
                <asp:LinkButton ID="lbNext" runat="server" Font-Bold="True" OnClick="lbNext_Click1">
Trang sau
                </asp:LinkButton>
            </td>
        </tr>
    </table>
    <div style="float: left; width: 100%; margin: 10px 0 10px 0;">
        <asp:HyperLink runat="server" ID="hplAdd" NavigateUrl="/AdminCP/Images.aspx"
            CssClass="button-gg-green" Text="Thêm mới"></asp:HyperLink>
    </div>
</asp:Content>
